package com.svse.designPattern.behaviour.strategy.test;

import com.svse.designPattern.behaviour.strategy.impl.ConcreteStrategyA;
import com.svse.designPattern.behaviour.strategy.impl.ConcreteStrategyB;
import com.svse.designPattern.behaviour.strategy.service.Context;
import com.svse.designPattern.behaviour.strategy.service.Strategy;

/**
 * @author LiYuhang
 * @version 0.1
 * @application
 * @Date 2020/8/6 20:17
 */
public class test {
    public static void main(String[] args) {
        Context c=new Context();
        Strategy s=new ConcreteStrategyA();
        c.setStrategy(s);
        c.strategyMethod();
        System.out.println("-----------------");
        s=new ConcreteStrategyB();
        c.setStrategy(s);
        c.strategyMethod();
    }
}
